<style>
    .layui-form-switch {
        position: relative;
        height: 22px;
        line-height: 22px;
        min-width: 35px;
        padding: 0 5px;
        margin-top: 8px;
        border: 1px solid #d2d2d2;
        border-radius: 20px;
        cursor: pointer;
        background-color: #fff;
        -webkit-transition: .1s linear;
        transition: .1s linear;
        width: 50px;

    }
    .layui-form-onswitch {
        border-color: #5FB878;
        background-color: #5FB878;
        width: 50px;
    }
    .layui-form-onswitch i {
        left: 100%;
        margin-left: -21px;
        background-color: #fff;
    }
</style>
<form action="{:url()}" method="post" class="form_single">


        <div class="row">

            <input name="config_id" type="hidden" value="{$info['config_id']}"/>
          <div class="col-md-12">
            <div class="form-group">
                <label>注册协议</label>
                <textarea class="form-control textarea_editor" name="content" placeholder="请输入注册协议">{$info['value']|default=''}</textarea>
                {:widget('editor/index', array('name'=> 'content','value'=> ''))}

            </div>
          </div>

        </div>
        
      <div class="box-footer">
          
        <input type="hidden" name="id" value="{$info['id']|default='0'}"/>
        
        {include file="layout/edit_btn_group"/}
        
      </div>
        
      </div>
      </div>
</form>

<script>
    $('.onkey').click(function () {
        $(this).hide();
        $(this).next().show();
        $("input[name='"+$(this).attr('data-code')+"']").val(0);
    })
    $('.offkey').click(function () {
        $(this).hide();
        $(this).prev().show();
        $("input[name='"+$(this).attr('data-code')+"']").val(1);

    })
</script>